import logging

# local_work_path = '/home/mfg/work/'
local_work_path = '/home/mfg/'
logs = logging.getLogger("PYTHON_API_LOGS")
logs.setLevel(logging.DEBUG)

# 创建FileHandler对象
fh = logging.FileHandler(local_work_path + r'python_api.log')
fh.setLevel(logging.DEBUG)

# 创建Formatter对象
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)

# 将FileHandler对象添加到Logger对象中
logs.addHandler(fh)


def make_logs(logs_string):
    logs.info(logs_string)
